import Vue from 'vue'
import VueI18n from 'vue-i18n'
// import Cookies from 'js-cookie'
import elementEnLocale from 'element-ui/lib/locale/lang/en' // element-ui lang
import elementZhLocale from 'element-ui/lib/locale/lang/zh-CN'// element-ui 中文


// import elementZhLocale from 'element-ui/lib/locale/lang/de'// element-ui 德国
// import elementZhLocale from 'element-ui/lib/locale/lang/it'// element-ui 意大利
// import elementZhLocale from 'element-ui/lib/locale/lang/da'// element-ui 丹麦
// import elementZhLocale from 'element-ui/lib/locale/lang/fr'// element-ui 法语
// import elementZhLocale from 'element-ui/lib/locale/lang/nl'// element-ui 荷兰语
// import elementZhLocale from 'element-ui/lib/locale/lang/pt'// element-ui 葡萄牙
// import elementZhLocale from 'element-ui/lib/locale/lang/sv-SE'// element-ui 瑞典
// import elementZhLocale from 'element-ui/lib/locale/lang/es'// element-ui 西班牙

import enLocale from './de' //德国
import zhLocale from './zh' //中国



Vue.use(VueI18n)

const messages = {
  en: {
    ...enLocale,
    ...elementEnLocale
  },
  zh: {
    ...zhLocale,
    ...elementZhLocale
  },

 
}

const i18n = new VueI18n({
  locale: Cookies.get('language') || 'zh', // set locale
  messages // set locale messages
})

export default i18n
